Introduction
The .netCHARTING analysis engine provides many statistical calculations and financial indicators allowing quick and accurate analysis of your data.
Getting Data
The first step is to get a series of data to analyze. Please see the following tutorials as a reference on data acquisition.
Calculated series and financial indicators often use multiple chart areas. For more info, see:
Analysis Engine
Three classes provide the methods used for analysis.
The following code snippet demonstrates calculating the mean of a series collection.
[C#]
...
SeriesCollection mySeries = ...; // Original seriesCollection
Series resultSeries = StatisticalEngine.Mean(mySeries);
Chart.SeriesCollection.Add(resultSeries);
[Visual Basic]
...
Dim mySeries As SeriesCollection = ...(seriesCollection)... ' Original seriesCollection
Series resultSeries = StatisticalEngine.Mean(mySeries)
Chart.SeriesCollection.Add(resultSeries)
Many samples are available under the Features / Analysis Engine section that demonstrate this functionality. |
ForecastEngine
The forecast engine contains a set of simple methods to perform common forecasting operations. However, the class also contains an advanced set of methods for users familiar with the mathematical formulas.
IndicatorOptions
Both analysis classes contain a static Options class that provides additional options for use with the analysis engine.
-
PopulateSubValues
When a series is calculated down to a single element, the element values of the original series can be included in the resulting element as SubValues.A similar feature is also available in the dataEngine: PopulateDateGroupingSubValues Property - MatchColors
Gets or sets a value that indicates whether calculated elements will use the same colors that are assigned to original series. Both, the original and derived data objects must be placed on the same chart to enable this feature because colors are generally based on a palette at runtime.
The following sample demonstrates using the statistical engine's indicator options.
[C#]
...
SeriesCollection mySeries = ...; // Original seriesCollection
StatisticalEngine.Options.PopulateSubValues = true;
Element resultElement = StatisticalEngine.Mean(mySeries);
Chart.SeriesCollection.Add(resultElement);
[Visual Basic]
...
Dim mySeries As SeriesCollection ... // Original series
StatisticalEngine.IndicatorOptions.PopulateSubValues = True
Element resultElement = StatisticalEngine.Mean(mySeries)
Chart.SeriesCollection.Add(resultSeries)